package com.asset.troubleticket.controller; 

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;

import com.asset.troubleticket.dao.EmployeeDao;
import com.asset.troubleticket.domain.Employee;
import com.asset.troubleticket.service.EmployeeService;
import com.mycompany.webservice.service.InterestRateService;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class TestController {
	@Autowired
	EmployeeService employeeService ;
@Autowired
@Qualifier(value="rateServiceClient")
private InterestRateService interestRateService;

//@RequestMapping(value="/addPerson.htm", method=RequestMethod.POST)
//public ModelAndView addPerson(Person p, Errors errors){
//	
//}
	@RequestMapping(value="/home", method=RequestMethod.GET)
	public String addPerson(){
		Employee emp = new Employee();
		emp.setName("ahmed gamal");
		employeeService.addEmployee(emp);
		//System.out.println(interestRateService.getMortgageTypes());
		return "home";
	}
}
